#include<stdio.h>
int main()
{
	int I,M;
	scanf("%d",&I);
	if(I>1000000)
		M=(I-1000000)*0.01+1000000*0.1;
	if(I<100000)
		M=I*0.1;
	if(400000<I&&I<=600000)
		M=(I-400000)*0.03+400000*0.1;
	if(600000<I&&I<=1000000)
		M=(I-600000)*0.15+600000*0.1;
	if(200000<I&&I<=400000)
		M=(I-200000)*0.05+200000*0.1;
	if(100000<I&&I<=200000)
		M=(I-100000)*0.075+100000*0.1;
	printf("%d",M);
}
